/* ******************************************************************
 * This file is part of the escal project and distributed under the
 * terms of the GNU General Public License Version 3
 * Copyright (C) 2008 Epocher (xijiaosdq@gmail.com)
 * See COPYING file for licensing information.
 *******************************************************************/

#ifndef PREFERENCE_DIALOG_H
#define PREFERENCE_DIALOG_H
#include "ui_preference_dialog.h"
#include <QDialog>
#include <QList>
#include <QListWidget>
#include <QItemSelectionModel>

class QWidget;
class QDialog;
class BaseConfigWindow;

class PreferenceDialog: public QDialog, protected Ui::PreferenceDialog{
	Q_OBJECT
public:
	PreferenceDialog(QWidget *parent=0);
public slots:
	void accept();
	void reject();
	void applyCurrent();
	void resetCurrent();
	void setDefaultCurrent();
protected slots:
	void changeRow(const QModelIndex& current);
protected:
	void addWidgets();
private:
	QList<BaseConfigWindow *> widgetList;
	int formerRow;
};


#endif /* PREFERENCE_DIALOG_H */
